In a search application that uses retrospective search techniques, such as a Google search, the search application initially builds an index of data to be searched at a later time. The index may be updated as new data is provided. While the index allows for efficient searches when a search query is provided, the need to index the data before executing the search query increases the complexity and expense of some real-time applications. In order to obtain a real-time or near real-time result for several search queries, the search queries must be executed separately against a potentially large index with repetitions for each update to the index.
In contrast to retrospective search techniques, prospective search techniques entail the comparing of continuous input streams of data sets against a set of predefined queries, as a result of which each data set of the stream may be matched to one or more of the predefined queries. Based on the matching of a data set to one or more of the queries, certain predefined actions corresponding to the matched queries may then be triggered. Thus, a prospective search query is an anticipatory query that is defined prior to the arrival of data and may act as a “selector” for the subsequent stream of incoming data sets. The matching is performed on the arrival of a data set in the stream and an action associated with a query is performed if the data set matches that query. For example, if a query is defined such that (language=“EN” AND region=“US” AND device=“MotoX”) then a data set with values such as (serial_no=ABC1234; language=“EN”; region=“US”; device=“MotoX”; carrier=“ABC Wireless”) will match the query. If an action is associated with the query then that action is performed on this data that matches the query. If there is another data set from the data stream with values such as (serial_no=ABC1235; language=“CN”; region=“US”; device=“MotoX”; carrier=“ABC Wireless”), this does not match the query and an action associated with that match is not performed on that data set.
If there is a second query that is defined such that (language=“EN” and region=“US” and carrier=“ABC Wireless”) then the same data stream with values (serial_no=ABC1234; language=“EN”; region=“US”; device=“MotoX”; carrier=“ABC Wireless”) matches both the first query and the second query and thus the actions associated with both the queries may be performed. In some scenarios, it is desirable to reduce the occurrence of performing multiple actions for the same data set. For example, duplicate actions could result in redundant pieces of data being sent to a mobile device or the actions could be conflicting actions that interfere with mobile device operations. As another example, in a client-server architecture where a mobile device (e.g., a client) provides a data set to an update server (e.g., a server), several software updates or configuration settings for mobile devices may be maintained on the server while only certain updates or settings are needed by a given device. There is a possibility that the data set for a mobile device matches more than one predefined query, as a result of which a repetitive set of predefined actions (e.g., transmission of an over-the-air software update or updated device configuration settings to the mobile device) would be triggered.